﻿using Prism.Commands;
using Prism.Ioc;
using Prism.Modularity;
using Prism.Regions;
using YJTTool.CustomerInfo.ViewModels;
using YJTTool.CustomerInfo.Views;

namespace YJTTool.CustomerInfo
{
    public class CustomerInfoModule : IModule
    {
        private readonly IRegionManager _regionManager;

        public CustomerInfoModule(IRegionManager regionManager)
        {
            _regionManager = regionManager;
        }
        public void OnInitialized(IContainerProvider containerProvider)
        {

        }

        public void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.RegisterForNavigation<CustomerInfoView>();
            _regionManager.RegisterViewWithRegion("ContentRegion", typeof(CustomerInfoView)); // 注册 CustomerInfoView 到同一区域


        }
    }
}